<nav class="navbar navbar-default" role="navigation">
	  	<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
			  	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
			  	</button>
			  	<a class="navbar-brand" href="#">Wbc-电商平台-AngularJS</a>
			</div>
			
			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1 chen">
			  	<ul id="nav" class="nav navbar-nav">
					<li  class="active"><a href="#/goods">商品管理</a></li>
					<li><a href="#/classify">类别管理</a></li>
					<li><a href="#/users">用户管理</a></li>
					<li><a href="#/order">订单管理</a></li>
					<li><a href="#/evaluate">用户评价</a></li>
					<li class="dropdown">
					  	<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
					  	<ul class="dropdown-menu" role="menu">
							<li><a href="javascript:;">Action</a></li>
							<li><a href="javascript:;">Another action</a></li>
							<li><a href="javascript:;">Something else here</a></li>
							<li class="divider"></li>
							<li><a href="javascript:;">Separated link</a></li>
							<li class="divider"></li>
							<li><a href="javascript:;">One more separated link</a></li>
					  	</ul>
					</li>
					<li><a href="#/log_reg" class="myname">登录/注册</a></li>
					
			  	</ul>
			  	<ul class="nav navbar-nav navbar-right">
					
					<li class="dropdown">
				  		<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
					  	<ul class="dropdown-menu" role="menu">
							<li><a href="javascript:;">Action</a></li>
							<li><a href="javascript:;">Another action</a></li>
							<li><a href="javascript:;">Something else here</a></li>
							<li class="divider"></li>
							<li><a href="javascript:;">Separated link</a></li>
					  	</ul>
					</li>
			  	</ul>
			</div><!-- /.navbar-collapse -->
	  	</div><!-- /.container-fluid -->
	</nav>

<script type="text/javascript">
	!function(){
		var path = location.href.split('#/')[1];
		console.log(path);
		$('#nav').on('click','li',function(){
			$(this).addClass('active').siblings('.active').removeClass('active');
		});
		$('#nav').find('a[href$="'+path+'"]').trigger('click');
	}();
	
</script>
